<!doctype html>
<html lang="zh-CN">

<head>
  <meta charset="<?php echo $cfg_soft_lang; ?>">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <script src="<?php echo $cfg_cmsurl;?>/static/js/jquery.min.js"></script>
  <link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/bootstrap.min.css">
  <link href="<?php echo $cfg_cmsurl;?>/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
  <link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/dede.css">
  <link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/member.css">
  <title>文档管理 - 会员中心 - <?php echo $cfg_webname; ?></title>
  <script type="text/javascript">
    function viewArc(aid) {
      window.open("{dede:global.cfg_phpurl /}/view.php?aid=" + aid);
    }
    function editArc(aid, channelid) {
      location = "archives_do.php?dopost=edit&channelid=" + channelid + "&aid=" + aid;
    }
    function delArc(aid) {
      if (window.confirm('你确定要删除这篇文档吗?')) location = "archives_do.php?aid=" + aid + "&dopost=delArc";
    }
  </script>
</head>

<body>
  <?php include(DEDEMEMBER."/templets/top_login.htm"); ?>

  <main class="member">
    <div class="container-fluid pannel">
      <div class="container">
        <div class="row">
          <?php
          $_menu_conex = true; // 展开编辑信息
          ?>
          <?php include(DEDEMEMBER."/templets/menu.htm"); ?>
          <div class="pannel-main col-md-9 mt-3 mb-3">
            <div class="pannel-main-container">
              <nav class="navbar navbar-expand-lg">
                <ul class="navbar-nav mr-auto mt-2">
                  <li class="nav-item">
                    <a class="nav-link<?php echo ($arcrank=='')? ' active' : '';?>"
                      href="content_sg_list.php?channelid=<?php echo $channelid;?>">全部</a>
                  </li>
                  <li class="nav-item">
                    <a class="nav-link<?php echo ($arcrank=='1')? ' active' : '';?>"
                      href="content_sg_list.php?channelid=<?php echo $channelid;?>&arcrank=1">已审核</a>
                  </li>
                  <li class="nav-item">
                    <a class="nav-link<?php echo ($arcrank=='-1')? ' active' : '';?>"
                      href="content_sg_list.php?channelid=<?php echo $channelid;?>&arcrank=-1">未审核</a>
                  </li>
                  <li class="nav-item">
                    <a class="nav-link<?php echo ($arcrank=='-2')? ' active' : '';?>"
                      href="content_sg_list.php?channelid=<?php echo $channelid;?>&arcrank=-2">被退回</a>
                  </li>
                </ul>
                <span class="navbar-text">
                  <a href="archives_do.php?dopost=addArc&channelid=<?php echo $channelid;?>"
                    class="btn btn-success btn-sm">添加内容</a>
                </span>
              </nav>
              <div class="table-responsive">
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
                  <thead>
                    <tr>
                      <th width="25%">文章标题</th>
                      <th width="15%">类目 </th>
                      <th>状态 </th>
                      <th>点击 </th>
                      <th width="15%">发布时间 </th>
                      <th width="25%">操作</th>
                    </tr>
                  </thead>
                  <tbody>
                    {dede:datalist}
                    <tr>
                      <td class="tabTitle"><a
                          href='<?php echo $cfg_phpurl; ?>/view.php?aid=<?php echo $fields['aid']; ?>'
                          target='_blank'><?php echo $fields['title']; ?></a> </td>
                      <td align="center"><?php echo $fields['typename']; ?></td>
                      <td align="center"><?php
                        if($fields['arcrank']>=0) echo "已审核";
                        else if($fields['arcrank']==-2) echo "<font color='blue'>被退回</font>";
                        else echo "<font color='red'>未审核</font>";
                        ?></td>
                      <td align="center"><?php echo $fields['click']; ?></td>
                      <td align="center"><?php echo GetDateMk($fields['senddate']); ?></td>
                      <td align="center" class="doPost">
                        <a
                          href="javascript:editArc(<?php echo $fields['aid']?>,<?php echo $fields['channel']?>);">修改</a>
                        | <a href="javascript:delArc(<?php echo $fields['aid']?>);">删除</a> | <a
                          href="javascript:viewArc(<?php echo $fields['aid']; ?>);">预览</a>
                      </td>
                    </tr>
                    {/dede:datalist}
                  </tbody>
                </table>
              </div>
              <nav>
                {dede:pagelist listsize=5 /}
              </nav>

            </div>
          </div>
        </div>
      </div>
    </div>
  </main>
  <?php include(DEDEMEMBER."/templets/footer.htm"); ?>
</body>

</html>